﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TicketMGR.Hibernate.BusinessObjects
{
    class Transaction : ObjectBase
    {
        private System.DateTime? _transactionDate = null;
        private int? _amount = null;
        private double? _pricePerBlock = null;

        private Agent _agent = null;
        private Channel _channel = null;
        private TicketType  _ticketType = null;
        private Unit _unit = null;
        private Guid _id ;
        public virtual Guid Id
        {
            get
            {
                return _id;
            }
            set
            {
                OnIdChanging();
                _id = value;
                OnIdChanged();
            }
        }
        public virtual void OnIdChanging() { return; }
        public virtual void OnIdChanged() { return; }
        public virtual System.DateTime? TransactionDate
        {
            get { return _transactionDate; }
            set
            {
                OnTransactionDateChanging();
                _transactionDate = value;
                OnTransactionDateChanged();
            }
        }
        public virtual void OnTransactionDateChanging() { return ;}
        public virtual void OnTransactionDateChanged() { return ;}

        public virtual int? Amount
        {
            get { return _amount; }
            set
            {
                OnAmountChanging();
                _amount = value;
                OnAmountChanged();
            }
        }
        public virtual void OnAmountChanging() { return ;}
        public virtual void OnAmountChanged() { return ;}

        public virtual double? PricePerBlock
        {
            get { return _pricePerBlock; }
            set
            {
                OnPricePerBlockChanging();
                _pricePerBlock = value;
                OnPricePerBlockChanged();
            }
        }
        public virtual void OnPricePerBlockChanging() { return ;}
        public virtual void OnPricePerBlockChanged() { return ;}

        public virtual Agent Agent
        {
            get { return _agent; }
            set
            {
                OnAgentChanging();
                _agent = value;
                OnAgentChanged();
            }
        }
        public virtual void OnAgentChanging() { return ;}
        public virtual void OnAgentChanged() { return ;}

        public virtual Channel Channel
        {
            get { return _channel; }
            set
            {
                OnChannelChanging();
                _channel = value;
                OnChannelChanged();
            }
        }
        public virtual void OnChannelChanging() { return ;}
        public virtual void OnChannelChanged() { return ;}

        public virtual TicketType TicketType
        {
            get { return _ticketType; }
            set
            {
                OnTicketTypeChanging();
                _ticketType = value;
                OnTicketTypeChanged();
            }
        }
        public virtual void OnTicketTypeChanging() { return ;}
        public virtual void OnTicketTypeChanged() { return ;}

        public virtual Unit Unit
        {
            get { return _unit; }
            set
            {
                OnUnitChanging();
                _unit = value;
                OnUnitChanged();
            }
        }
        public virtual void OnUnitChanging() { return ;}
        public virtual void OnUnitChanged() { return ;}
    }
}
